<ul class="nav navbar-nav" data-in="fadeInDown" data-out="fadeOutUp">
    {{range $i, $v := .menu}}
        {{if $v.child}}
            <li class="dropdown">
                <a href="javascript: void(0);" class="dropdown-toggle" data-toggle="dropdown">
                    {{if $v.icon}}
                        <i class="{{$v.icon}}"></i>
                    {{end}}
                    {{$v.name}}</a>
                <ul class="dropdown-menu animated">
                    {{range $key, $item := $v.child}}
                        <li><a href="/{{$v.id}}/{{$item.id}}">{{$item.name}}</a></li>
                    {{end}}
                </ul>
            </li>
        {{else}}
            {{if eq $v.name "首页"}}
                <li><a href="/">
                        {{if $v.icon}}
                            <i class="{{$v.icon}}"></i>
                        {{end}}
                        {{$v.name}}
                    </a></li>
            {{else}}
                <li><a href="/{{$v.id}}">
                        {{if $v.icon}}
                            <i class="{{$v.icon}}"></i>
                        {{end}}
                        {{$v.name}}
                    </a></li>
            {{end}}
        {{end}}
    {{end}}
    <li id="handleSearch"><a href="javascript: void(0);"><i class="iconfont icon-search"></i></a></li>
</ul>

